package jpa.entitys.promis.construction;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;

import jpa.entitys.common.CommonEntity;


/**
 * The persistent class for the SUPPLIER_DEBIT_NOTES database table.
 * 
 */
@Entity
@Table(name="SUPPLIER_DEBIT_NOTES")
@NamedQueries({
    @NamedQuery(name = "SupplierDebitNote.findAll", query = " SELECT c FROM SupplierDebitNote c "),
    @NamedQuery(name = "SupplierDebitNote.findById", query = " SELECT c FROM SupplierDebitNote c WHERE c.id = :Id"),
    @NamedQuery(name = "SupplierDebitNote.findByStaging", query = " SELECT c FROM SupplierDebitNote c WHERE c.syncIsstaging = :syncIsstaging"),
    @NamedQuery(name = "SupplierDebitNote.findBySapLivDocNo", query = " SELECT c FROM SupplierDebitNote c WHERE c.id.company = :company And c.id.project = :project And c.syncExternalRefNo = :syncExternalRefNo And c.status = :status ")
})
public class SupplierDebitNote extends CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private SupplierDebitNotePK id;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}

	@Column(name="APPROVED_BY")
	private String approvedBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="APPROVED_ON")
	private Date approvedOn;

	@Column(name="CREATED_BY")
	private String createdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	private String currency;

	@Column(name="DEBIT_AMOUNT")
	private BigDecimal debitAmount;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="DEBIT_NOTE_DATE")
	private Date debitNoteDate;

	@Column(name="DEPARTMENT_CODE")
	private String departmentCode;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="DUE_DATE")
	private Date dueDate;

	@Column(name="EXCHANGE_RATE")
	private BigDecimal exchangeRate;

	@Column(name="INSTALLMENT_FLAG")
	private String installmentFlag;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="NET_AMOUNT")
	private BigDecimal netAmount;

	@Column(name="NET_AMOUNT_LOCAL")
	private BigDecimal netAmountLocal;

	@Column(name="PREPARED_BY")
	private String preparedBy;

	private String remarks;

	@Column(name="REQUESTED_BY")
	private String requestedBy;

	private String status;

	@Column(name="SUPPLIER_CODE")
	private String supplierCode;

	@Column(name="SUPPLIER_DEBIT_NOTES_ID")
	private String supplierDebitNotesId;

	@Column(name="SUPPLIER_REFERENCE")
	private String supplierReference;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SUPPLIER_REFERENCE_DATE")
	private Date supplierReferenceDate;

	@Column(name="SYNC_CREATEDBY")
	private String syncCreatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY")
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO")
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSTAGING")
	private String syncIsstaging;

	@Column(name="SYNC_ISSYNC")
	private String syncIssync;

	@Column(name="SYNC_UPDATEDBY")
	private String syncUpdatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="TAX_RATE")
	private BigDecimal taxRate;

	@Column(name="TAX_TYPE")
	private String taxType;	

	@Column(name="VAT_AMOUNT")
	private BigDecimal vatAmount;

	@Column(name="SAP_LIV_DOC")
	private String sapLivDoc;
	
	
    public SupplierDebitNote() {
    }

    
	/**
	 * @return the sapLivDoc
	 */
	public String getSapLivDoc() {
		return sapLivDoc;
	}


	/**
	 * @param sapLivDoc the sapLivDoc to set
	 */
	public void setSapLivDoc(String sapLivDoc) {
		this.sapLivDoc = sapLivDoc;
	}


	public SupplierDebitNotePK getId() {
		return this.id;
	}

	public void setId(SupplierDebitNotePK id) {
		this.id = id;
	}
	
	public String getApprovedBy() {
		return this.approvedBy;
	}

	public void setApprovedBy(String approvedBy) {
		this.approvedBy = approvedBy;
	}

	public Date getApprovedOn() {
		return this.approvedOn;
	}

	public void setApprovedOn(Date approvedOn) {
		this.approvedOn = approvedOn;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getCurrency() {
		return this.currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public BigDecimal getDebitAmount() {
		return this.debitAmount;
	}

	public void setDebitAmount(BigDecimal debitAmount) {
		this.debitAmount = debitAmount;
	}

	public Date getDebitNoteDate() {
		return this.debitNoteDate;
	}

	public void setDebitNoteDate(Date debitNoteDate) {
		this.debitNoteDate = debitNoteDate;
	}

	public String getDepartmentCode() {
		return this.departmentCode;
	}

	public void setDepartmentCode(String departmentCode) {
		this.departmentCode = departmentCode;
	}

	public Date getDueDate() {
		return this.dueDate;
	}

	public void setDueDate(Date dueDate) {
		this.dueDate = dueDate;
	}

	public BigDecimal getExchangeRate() {
		return this.exchangeRate;
	}

	public void setExchangeRate(BigDecimal exchangeRate) {
		this.exchangeRate = exchangeRate;
	}

	public String getInstallmentFlag() {
		return this.installmentFlag;
	}

	public void setInstallmentFlag(String installmentFlag) {
		this.installmentFlag = installmentFlag;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public BigDecimal getNetAmount() {
		return this.netAmount;
	}

	public void setNetAmount(BigDecimal netAmount) {
		this.netAmount = netAmount;
	}

	public BigDecimal getNetAmountLocal() {
		return this.netAmountLocal;
	}

	public void setNetAmountLocal(BigDecimal netAmountLocal) {
		this.netAmountLocal = netAmountLocal;
	}

	public String getPreparedBy() {
		return this.preparedBy;
	}

	public void setPreparedBy(String preparedBy) {
		this.preparedBy = preparedBy;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getRequestedBy() {
		return this.requestedBy;
	}

	public void setRequestedBy(String requestedBy) {
		this.requestedBy = requestedBy;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSupplierCode() {
		return this.supplierCode;
	}

	public void setSupplierCode(String supplierCode) {
		this.supplierCode = supplierCode;
	}

	public String getSupplierDebitNotesId() {
		return this.supplierDebitNotesId;
	}

	public void setSupplierDebitNotesId(String supplierDebitNotesId) {
		this.supplierDebitNotesId = supplierDebitNotesId;
	}

	public String getSupplierReference() {
		return this.supplierReference;
	}

	public void setSupplierReference(String supplierReference) {
		this.supplierReference = supplierReference;
	}

	public Date getSupplierReferenceDate() {
		return this.supplierReferenceDate;
	}

	public void setSupplierReferenceDate(Date supplierReferenceDate) {
		this.supplierReferenceDate = supplierReferenceDate;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIsstaging() {
		return this.syncIsstaging;
	}

	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public BigDecimal getTaxRate() {
		return this.taxRate;
	}

	public void setTaxRate(BigDecimal taxRate) {
		this.taxRate = taxRate;
	}

	public String getTaxType() {
		return this.taxType;
	}

	public void setTaxType(String taxType) {
		this.taxType = taxType;
	}

	public BigDecimal getVatAmount() {
		return this.vatAmount;
	}

	public void setVatAmount(BigDecimal vatAmount) {
		this.vatAmount = vatAmount;
	}

}